import { ISchema } from "../packages/formily-react/src";

export const Submit: ISchema = {
  type: "object",
  properties: {
    type: {
      type: "string",
      enum: ["primary", "default", "dashed", "link", "text"],
      "x-decorator": "FormItem",
      "x-component": "Select",
      "x-component-props": {
        defaultValue: "primary",
      },
    },
    size: {
      type: "string",
      enum: ["large", "middle", "small"],
      "x-decorator": "FormItem",
      "x-component": "Select",
      "x-component-props": {
        defaultValue: "middle",
      },
    },
    htmlType: {
      type: "string",
      enum: ["submit", "button", "reset"],
      "x-decorator": "FormItem",
      "x-component": "Select",
      "x-component-props": {
        defaultValue: "submit",
      },
    },
    block: {
      type: "boolean",
      "x-decorator": "FormItem",
      "x-component": "Switch",
    },
    danger: {
      type: "boolean",
      "x-decorator": "FormItem",
      "x-component": "Switch",
    },
    disabled: {
      type: "boolean",
      "x-decorator": "FormItem",
      "x-component": "Switch",
    },
    ghost: {
      type: "boolean",
      "x-decorator": "FormItem",
      "x-component": "Switch",
    },
    loading: {
      type: "boolean",
      "x-decorator": "FormItem",
      "x-component": "Switch",
    },
    children: {
      type: "string",
      "x-decorator": "FormItem",
      "x-component": "Input",
    },
  },
};
